home *** CD-ROM | disk | FTP | other *** search
/ Apple WWDC 1996 / WWDC96_1996 (CD).toast / Technology Materials / MacOS 8 Resources / Developer Tools / Mac OS 8 Interfaces & Libraries / Interfaces / PInterfaces / TextObjectUtilities.p < prev    next >
Text File  |  1996-05-01  |  4KB  |  89 lines

  1. {
  2.      File:        TextObjectUtilities.p
  3.  
  4.      Contains:    Text object Utilities Interfaces.
  5.  
  6.      Version:    Technology:    System 8
  7.                  Release:    Universal Interfaces 3.0d3 on Copland DR1
  8.  
  9.      Copyright:    © 1984-1996 by Apple Computer, Inc.  All rights reserved.
  10.  
  11.      Bugs?:        If you find a problem with this file, send the file and version
  12.                  information (from above) and the problem description to:
  13.  
  14.                      Internet:    apple.bugs@applelink.apple.com
  15.                      AppleLink:    APPLE.BUGS
  16.  
  17. }
  18. {$IFC UNDEFINED UsingIncludes}
  19. {$SETC UsingIncludes := 0}
  20. {$ENDC}
  21.  
  22. {$IFC NOT UsingIncludes}
  23.  UNIT TextObjectUtilities;
  24.  INTERFACE
  25. {$ENDC}
  26.  
  27. {$IFC UNDEFINED __TEXTOBJECTUTILITIES__}
  28. {$SETC __TEXTOBJECTUTILITIES__ := 1}
  29.  
  30. {$I+}
  31. {$SETC TextObjectUtilitiesIncludes := UsingIncludes}
  32. {$SETC UsingIncludes := 1}
  33.  
  34. {$IFC UNDEFINED __CONDITIONALMACROS__}
  35. {$I ConditionalMacros.p}
  36. {$ENDC}
  37. {$IFC UNDEFINED __UNICODE__}
  38. {$I Unicode.p}
  39. {$ENDC}
  40. {$IFC UNDEFINED __TEXTOBJECTS__}
  41. {$I TextObjects.p}
  42. {$ENDC}
  43. {$IFC UNDEFINED __AEDATAMODEL__}
  44. {$I AEDataModel.p}
  45. {$ENDC}
  46.  
  47. {$PUSH}
  48. {$ALIGN MAC68K}
  49. {$LibExport+}
  50.  
  51. {$IFC FOR_SYSTEM7_AND_SYSTEM8_PREEMPTIVE }
  52. FUNCTION ConvertPStringToTextObject(srcString: Str255; srcEncoding: TextEncoding; localeID: LocaleIdentifier; oldTextObject: TextObject; VAR newTextObject: TextObject; optionBits: OptionBits): OSStatus; C;
  53. FUNCTION ConvertTextObjectToPString(textObject: ConstTextObject; startIndex: TextObjectIndex; endIndex: TextObjectIndex; destString: StringPtr; destMaxStringLength: ByteCount; destEncoding: TextEncoding; VAR nextIndex: TextObjectIndex): OSStatus; C;
  54. FUNCTION ConvertCStringToTextObject(srcString: ConstCStringPtr; srcEncoding: TextEncoding; localeID: LocaleIdentifier; oldTextObject: TextObject; VAR newTextObject: TextObject; optionBits: OptionBits): OSStatus; C;
  55. FUNCTION ConvertTextObjectToCString(textObject: ConstTextObject; startIndex: TextObjectIndex; endIndex: TextObjectIndex; destString: CStringPtr; destMaxStringLength: ByteCount; destEncoding: TextEncoding; VAR nextIndex: TextObjectIndex): OSStatus; C;
  56. FUNCTION ConvertUnicodeStringToTextObject({CONST}VAR srcString: UniChar; stringLength: ByteCount; srcEncoding: TextEncoding; srcLocaleID: LocaleIdentifier; oldTextObject: TextObject; VAR newTextObject: TextObject; optionBits: OptionBits): OSStatus; C;
  57. FUNCTION ConvertTextObjectToUnicodeString(textObject: ConstTextObject; startIndex: TextObjectIndex; endIndex: TextObjectIndex; VAR destString: UniChar; destMaxStringLength: ByteCount; destEncoding: TextEncoding; VAR nextIndex: TextObjectIndex; VAR destLength: ByteCount): OSStatus; C;
  58. FUNCTION ConcatTextObjects(textObject1: ConstTextObject; textObject2: ConstTextObject; VAR newTextObject: TextObject; optionBits: OptionBits): OSStatus; C;
  59. {  Text object resource types  }
  60.  
  61. CONST
  62.     kTextObjResourceType        = 'txto';                        {  single text object }
  63.     kTextObjListResourceType    = 'txt#';                        {  list of text objects }
  64.  
  65. {$ENDC}
  66. {$IFC FOR_SYSTEM7_AND_SYSTEM8_COOPERATIVE }
  67. FUNCTION GetTextObject(VAR newTextObject: TextObject; textObjResID: INTEGER): OSStatus; C;
  68. FUNCTION GetTextObjectListCount(textObjListResID: INTEGER; VAR count: UInt16): OSStatus; C;
  69. FUNCTION GetIndTextObject(VAR newTextObject: TextObject; textObjListResID: INTEGER; index: UInt16): OSStatus; C;
  70. {$ENDC}
  71. {$IFC FOR_SYSTEM8_PREEMPTIVE }
  72. {$IFC FOR_PTR_BASED_AE }
  73. {  The caller must provide the text object to be filled in.  }
  74. FUNCTION ConvertAESubDescToTextObject({CONST}VAR subDesc: AESubDesc; textObject: TextObject): OSStatus; C;
  75. FUNCTION ConvertTextObjectToAEDesc(textObject: ConstTextObject; startIndex: TextObjectIndex; endIndex: TextObjectIndex; VAR descriptor: AEDesc): OSStatus; C;
  76. FUNCTION WriteTextObjectToAEStream(stream: AEStream; textObject: ConstTextObject; startIndex: TextObjectIndex; endIndex: TextObjectIndex): OSStatus; C;
  77. {$ENDC}
  78. {$ENDC}
  79. {$ALIGN RESET}
  80. {$POP}
  81.  
  82. {$SETC UsingIncludes := TextObjectUtilitiesIncludes}
  83.  
  84. {$ENDC} {__TEXTOBJECTUTILITIES__}
  85.  
  86. {$IFC NOT UsingIncludes}
  87.  END.
  88. {$ENDC}
  89.